package com.itxx.collection.test.domain;

public class Student {
    private String name;
    private int age;
    private  String gebder;

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gebder='" + gebder + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Student student = (Student) o;

        if (age != student.age) return false;
        if (name != null ? !name.equals(student.name) : student.name != null) return false;
        return gebder != null ? gebder.equals(student.gebder) : student.gebder == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + age;
        result = 31 * result + (gebder != null ? gebder.hashCode() : 0);
        return result;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGebder() {
        return gebder;
    }

    public void setGebder(String gebder) {
        this.gebder = gebder;
    }

    public Student(String name, int age, String gebder) {
        this.name = name;
        this.age = age;
        this.gebder = gebder;
    }

    public Student() {
    }
}
